class CreateMedias < ActiveRecord::Migration
  def self.up
    create_table :medias do |t|
      t.string :nom, :null => false
      t.string :taille
      t.string :img_src
      t.string :description
      t.string :details
      t.string :fichier
      t.string :langue
      t.text :nfo
      t.string :url
      t.string :local_path
      t.integer :dl_count, :null => false, :default => 0
      t.integer :category_id, :null => false
      t.integer :user_id, :null => false, :default => 0

      t.timestamps
    end
  end

  def self.down
    drop_table :medias
  end
end
